﻿<mac:DataFormWindow x:Class="DemoDataGridToolBar.ProductFormRIA_dir"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"   
								
		xmlns:mac="clr-namespace:System.Windows.Controls.DGTB;assembly=Slma.Windows.Controls"								

		mc:Ignorable="d"
    d:DesignHeight="500" d:DesignWidth="400">
	<mac:DataFormWindow.Resources>
		<Style x:Key="la" TargetType="TextBlock">
			<Setter Property="Width" Value="100" />
			<Setter Property="VerticalAlignment" Value="Center" />
			<Setter Property="HorizontalAlignment" Value="Left" />
		</Style>
		<Style x:Key="ms" TargetType="TextBox">
			<Setter Property="Width" Value="170" />
			<Setter Property="Margin" Value="0,2,0,2" />
		</Style>
	</mac:DataFormWindow.Resources>

	<Grid x:Name="LayoutRoot" >
		<Border  Padding="10" CornerRadius="5" BorderThickness="1" BorderBrush="Gray" Background="White" 	>
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition />
					<RowDefinition Height="Auto" />
				</Grid.RowDefinitions>
				<StackPanel Grid.Row="0">
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_name}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding Name, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_poductnumber}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding ProductNumber, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_color}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding Color, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>

					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_size}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding Size, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_weight}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding Weight, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_listprice}" Style="{StaticResource la}"  />
						<TextBox Text="{Binding ListPrice, Mode=TwoWay,NotifyOnValidationError=True,ValidatesOnExceptions=True}" Style="{StaticResource ms}"/>
					</StackPanel>
					<StackPanel Orientation="Horizontal">
						<TextBlock  Text="{StaticResource ls_product_sellstartdate}" Style="{StaticResource la}"  />
						<sdk:DatePicker SelectedDate="{Binding SellStartDate.Date, Mode=OneWay ,StringFormat=d ,NotifyOnValidationError=True,ValidatesOnExceptions=True}" />
					</StackPanel>
				</StackPanel>
				<!-- ValidationSummary -->
				<dataInput:ValidationSummary Grid.Row="1" Name="coErrorSummary" />
				<Button x:Name="CancelButton" Content="Cancel"  Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" />
				<Button x:Name="OKButton" Content="OK"  Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="2" />
			</Grid>
		</Border>
	</Grid>
	
</mac:DataFormWindow>
